#ifndef __GAME_H__
#define __GAME_H__

// Includes
#include <PA9.h>       // Include for PA_Lib


#include "Avatar.h"
#include "Init.h"
#include "DPadControls.h"
#include "StylusControls.h"
#include "StartSelectButtons.h"
#include "Update.h"
#include "MonsterManager.h"


//INITIALIZE ALL GAME DATA//
//--------------------------
//--------------------------
void PlayGame()
	{
	while (1)
	{	
		
		//constantly display player stats
		player.DisplayStats();
		
		//Input D-Pad controls
		//animate sprite and move appropriately
		DPadCtrl();

		//Input Stylus controls
		//animate sprite and move appropiately
		StylusCtrl();
		
		//Monster Manager actions
		MonMan();
		
		//if Start is pressed or the lid is closed, pause the game
		if(Pad.Newpress.Start || PA_CheckLid())
		{
			startButton();
		}
		
		//if Select is pressed, toggle menu
		if(Pad.Newpress.Select)
		{
			selectButton();
		}
		
		//sound
		AS_MP3DirectPlay((u8*)SM, (u32)SM_size);
		AS_SetMP3Loop(true);
		rate = 0;
		newrate = 0;

		//Update anything else at this time
		gameUpdate();
		
		
		



		PA_WaitForVBL();
	}
}
	

#endif  //__GAME_H__
